<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        height: 100%;
        display: flex;
      }
      div {
        margin: auto;
        width: 300px;
        height: 300px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #ccc;
      }
      input {
        width: 100px;
        height: 50px;
      }
      button {
        width: 50px;
        height: 50px;
      }
    </style>
  </head>
  <body>
    <div><input type="text" /><button>判断</button></div>
  </body>
  <script type="module">
    import Odd from "./odd.js";
    let oInput = document.querySelector("input");
    let oBtn = document.querySelector("button");
    oBtn.onclick = function () {
      let num = Number(oInput.value);
      oInput.value = Odd(num);
      oInput.onfocus = function () {
        oInput.value = null;
      };
    };
  </script>
</html>
